﻿using System.Collections.Generic;
using System.Globalization;

namespace TSharp.Core.Mvc.Web
{
    /// <summary>
    ///     系统环境提供器接口
    ///     <para>2010/10/26</para>
    ///     <para>TANGJINGBO</para>
    ///     <para>tangjingbo</para>
    /// </summary>
    public interface ISiteProvider
    {
        /// <summary>
        ///     是否启用多语言
        /// </summary>
        /// <value>
        ///     <c>true</c> if [enable culture]; otherwise, <c>false</c>.
        /// </value>
        bool EnableCulture { get; }

        /// <summary>
        ///     是否启用主题
        /// </summary>
        /// <value>
        ///     <c>true</c> if [enable theme]; otherwise, <c>false</c>.
        /// </value>
        bool EnableTheme { get; }

        /// <summary>
        ///     根据Name获取区域语言对象
        /// </summary>
        /// <param name="cultureName">Name of the culture.</param>
        /// <returns></returns>
        CultureInfo GetCultureInfo(string cultureName);

        /// <summary>
        ///     获取当前请求默认语言
        /// </summary>
        /// <returns></returns>
        CultureInfo GetCurrentCultureInfo();

        /// <summary>
        ///     设置当前请求的Cookie，Session以及线程的区域语言设置
        /// </summary>
        /// <param name="ci">The ci.</param>
        void SetCurrentCultureInfo(CultureInfo ci);

        /// <summary>
        ///     设置当前请求的Cookie，Session以及线程的区域语言设置
        /// </summary>
        /// <param name="CultureName">Name of the culture.</param>
        void SetCurrentCultureInfo(string CultureName);

        /// <summary>
        ///     获取站点所有可用语言
        /// </summary>
        /// <returns></returns>
        IEnumerable<Culture> GetAllCultureInfo();

        //////////////////////////////////////////////////

        /// <summary>
        ///     获取当前请求主题
        /// </summary>
        /// <value>
        ///     <c>true</c> if [enable theme]; otherwise, <c>false</c>.
        /// </value>
        /// <returns></returns>
        Theme GetCurrentTheme();

        /// <summary>
        ///     获取所有可用主题
        /// </summary>
        /// <returns></returns>
        IEnumerable<Theme> GetAllTheme();

        /// <summary>
        ///     设置当前请求主题
        /// </summary>
        /// <param name="theme">The theme.</param>
        void SetCurrentTheme(Theme theme);

        /// <summary>
        ///     设置当前请求主题
        /// </summary>
        /// <param name="themeName">Name of the theme.</param>
        void SetCurrentTheme(string themeName);
    }
}